PackageReader.Create Method

Returns either a ZipPackageReader or LrmPackageReader, according to the type of package provided.

Parent Type: PackageReader

Namespace: Microsoft.LearningComponents

Assembly: Microsoft.LearningComponents.dll

Syntax
C#

public static PackageReader Create (
Stream package

)

Parameters

package

The zipped package (.zip or .ims) or .lrm package.

Return Value

A PackageReader that reads the supplied package.

Exceptions
Exception type Condition
ArgumentNullException

package is null.

Remarks

The stream is analyzed to determine if it is a zipped file. If it is not, it is assumed to be an .lrm package. In either case, the correctness of the package is not checked here, but rather in subsequent calls to e.g. CreateManifestNavigator.

The PackageReader that is returned uses the current user's credentials to read files from the package.